<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <link rel="icon" href="../../images/hospital-icon.png" type="image/x-icon">  <!--在网页标题左侧显示图标-->
    <!--    <link rel="shortcut icon" href="./images/hospital-icon.png" type="image/x-svg">-->
    <link rel="shortcut icon" href="../../images/hospital-icon.png" type="image/x-icon"><!--在收藏夹显示图标-->

    <title>账单管理-门诊管理系统</title>

    <!--时间风格及输入框风格-->
    <!--pickers css-->
    <link rel="stylesheet" type="text/css" href="../../js/bootstrap-datepicker/css/datepicker-custom.css" />
    <link rel="stylesheet" type="text/css" href="../../js/bootstrap-timepicker/css/timepicker.css" />
    <link rel="stylesheet" type="text/css" href="../../js/bootstrap-colorpicker/css/colorpicker.css" />
    <link rel="stylesheet" type="text/css" href="../../js/bootstrap-daterangepicker/daterangepicker-bs3.css" />
    <link rel="stylesheet" type="text/css" href="../../js/bootstrap-datetimepicker/css/datetimepicker-custom.css" />

    <link href="../../css/style.css" rel="stylesheet">
    <link href="../../css/style-responsive.css" rel="stylesheet">
    <!--时间风格及输入框风格-->

    <!--data table-->
    <link rel="stylesheet" href="../../js/data-tables/DT_bootstrap.css" />

    <link href="../../css/style.css" rel="stylesheet">
    <link href="../../css/style-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="../../js/html5shiv.js"></script>
    <script src="../../js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <!--左侧开始-->
    <div class="left-side sticky-left-side">

        <!--logo and iconic logo start-->
        <!--侧边栏顶部图标+文字-->
        <div class="logo">
            <a href="index_billing.html">
                <img src="../../images/hospital-icon.png" alt="" style="width: 40px;height: 40px">
                <p style="display: inline-block;font-size: 24px;">门诊管理系统</p>
            </a>
        </div>

        <!--收起状态的侧边栏顶部图标-->
        <div class="logo-icon text-center">
            <a href="index_billing.html"><img src="../../images/hospital-icon.png" alt="" style="width: 40px;height: 40px"></a>
        </div>
        <!--logo and iconic logo end-->

        <div class="left-side-inner">

            <!--sidebar nav start-->
            <!--侧边栏-->
            <ul class="nav nav-pills nav-stacked custom-nav">

                <li class="menu-list nav-active">
                    <a href="fontawesome.html">
                        <i class="fa fa-bullhorn"></i>
                        <span>账单管理</span>
                    </a>
                    <ul class="sub-menu-list">
                        <li class="active"><a href="billList.html"> 账单管理</a></li>
                        <li><a href="journalList.html"> 缴费单管理</a></li>
                    </ul>
                </li>

                <li class="logout">
                    <a href="#">
                        <i class="fa fa-sign-in"></i>
                        <span>退出登录</span>
                    </a>
                </li>

            </ul>
            <!--sidebar nav end-->
            <!--侧边栏导航结束-->

        </div>
    </div>
    <!-- left side end-->
    <!-- 左侧 部分 结束 -->

    <!-- main content start-->
    <div class="main-content" >

        <!-- header section start-->
        <!--顶部菜单部分开始-->
        <div class="header-section">

            <!--toggle button start-->
            <!--拨动按钮-收起侧边栏-->
            <a class="toggle-btn"><i class="fa fa-bars"></i></a>
            <!--toggle button end-->

            <!--notification menu start -->
            <!--通知菜单开始-->
            <div class="menu-right" id="headerApp">
                <ul class="notification-menu">

                    <li>
                        <a href="#" class="btn btn-default  info-number logout">
                            退出登录
                            <i class="fa fa-sign-out"></i>
                        </a>
                    </li>

                </ul>
            </div>
            <!--notification menu end -->
            <!--通知菜单结束-->
        </div>
        <!-- header section end-->
        <!--顶部菜单部分结束-->

        <!--body wrapper start-->
        <div class="wrapper" id="billingApp">
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel">
                        <header class="panel-heading">
                            账单管理
                            <span class="tools pull-right"></span>
                        </header>
                        <div class="panel-body">
                            <div class="adv-table editable-table ">

                                <div class="clearfix"  style="margin-bottom: 20px">
                                    <form class="form-inline" role="form">

                                        <div class="btn-group">
                                            <button data-toggle="dropdown" class="btn btn-info dropdown-toggle" type="button">
                                                <span v-text="selectPageSizeName">分页数</span>
                                                <span class="caret"></span>
                                            </button>
                                            <ul role="menu" class="dropdown-menu">
                                                <li><a href="#" @click="selectBillCheckThisPageSize(10)">10</a></li>
                                                <li><a href="#" @click="selectBillCheckThisPageSize(20)">20</a></li>
                                                <li><a href="#" @click="selectBillCheckThisPageSize(30)">30</a></li>
                                            </ul>
                                        </div>

                                        <div class="btn-group">
                                            <button data-toggle="dropdown" class="btn btn-info dropdown-toggle" type="button">
                                                <span v-text="selectBillPayFlagName">付费标记</span>
                                                <span class="caret"></span>
                                            </button>
                                            <ul role="menu" class="dropdown-menu">
                                                <li><a href="#" @click="selectBillCheckThisPayFlag(1,'已付费')">已付费</a></li>
                                                <li><a href="#" @click="selectBillCheckThisPayFlag(0,'未付费')">未付费</a></li>
                                            </ul>
                                        </div>

                                        <div class="form-group">
                                            <input v-model="selectBillPatientName" type="text" class="form-control" style="width: 300px" placeholder="根据患者姓名/患者ID查询">
                                        </div>

                                        <button type="button" class="btn btn-info" @click="selectBillButton()">
                                            查询
                                            <i class="fa fa-search"></i>
                                        </button>
                                        <button type="button" class="btn btn-default" @click="selectBillResetButton()">
                                            重置
                                            <i class="fa fa-undo"></i>
                                        </button>

                                    </form>
                                </div>


                                <table class="table table-striped table-hover table-bordered" id="editable-sample">
                                    <thead>
                                    <tr>
                                        <th>账单ID</th>
                                        <th>患者ID</th>
                                        <th>患者名称</th>
                                        <th>处方ID</th>
                                        <th>医嘱ID</th>
                                        <th>项目ID</th>
                                        <th>项目名称</th>
                                        <th>项目单价金额</th>
                                        <th>金额单位名称</th>
                                        <th>项目数量</th>
                                        <th>产品总计金额</th>
                                        <th>账单费用类型名称</th>
                                        <th>绑定缴费单标记</th>
                                        <th>缴费单ID</th>
                                        <th>付费状态标记</th>
                                        <th>创建时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="" v-for="bill in billList">
                                        <td v-text="bill.billRecordId">1</td>
                                        <td v-text="bill.patientId">1</td>
                                        <td v-text="bill.patientName">曾晨</td>
                                        <td v-text="bill.prescriptionId">1</td>
                                        <td v-text="bill.orderId">1</td>
                                        <td v-text="bill.itemId">1</td>
                                        <td v-text="bill.itemName">阿莫西林口腔崩解片</td>
                                        <td v-text="bill.itemPrice">150</td>
                                        <td v-text="bill.itemPriceUnitName">元</td>
                                        <td v-text="bill.itemNum">6</td>
                                        <td v-text="bill.itemTotalPrice">750</td>
                                        <td>
                                            <span class="label label-info" v-text="bill.billFeeTypeName">自费</span>
                                        </td>
                                        <td>
                                            <span class="label label-info" v-if="bill.billingFlag==1">已绑定</span>
                                            <span class="label label-default" v-if="bill.billingFlag==0">未绑定</span>
                                        </td>
                                        <td v-text="bill.accountId">1</td>
                                        <td>
                                            <span class="label label-info" v-if="bill.billPayFlag==1">已付费</span>
                                            <span class="label label-default" v-if="bill.billPayFlag==0">未付费</span>
                                        </td>
                                        <td v-text="bill.returnCreateTime">2022-04-28</td>

                                    </tr>
                                    </tbody>
                                </table>

                                <div class="clearfix">
                                    <div class="btn-group">

                                    </div>
                                    <div class="btn-group pull-right">
                                        <ul class="pagination pagination-sm">
                                            <li><a href="#"  @click.prevent="loadBillList(pageinfo.prePage)">上一页</a></li>
                                            <li v-for="n in pageinfo.navigatepageNums" @click.prevent="loadBillList(n)" :class="{'active': n == pageinfo.pageNum}">
                                                <a href="#" v-text="n">1</a>
                                            </li>
                                            <li><a href="#" @click.prevent="loadBillList(pageinfo.nextPage)">下一页</a></li>
                                        </ul>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
        <!--body wrapper end-->

        <!--footer section start-->
        <!--页脚部分开始-->
        <footer>
            2022 &copy; <a href="https://gitee.com/allen-zc/OutpatientManagementSystem" target="_blank">基于SSM的门诊管理系统</a>
            -
            <a href="https://gitee.com/allen-zc" target="_blank">AllenChen曾晨</a>
            -
            <p style="display: inline-block">ALL RIGHTS RESERVED.</p>
        </footer>
        <!--footer section end-->
        <!--页脚部分结束-->


    </div>
    <!-- main content end-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->
<script src="../../js/jquery-1.10.2.min.js"></script>
<script src="../../js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="../../js/jquery-migrate-1.2.1.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/modernizr.min.js"></script>
<script src="../../js/jquery.nicescroll.js"></script>

<!--时间风格及输入框风格-->
<!--pickers plugins-->
<script type="text/javascript" src="../../js/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="../../js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="../../js/bootstrap-daterangepicker/moment.min.js"></script>
<script type="text/javascript" src="../../js/bootstrap-daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="../../js/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
<script type="text/javascript" src="../../js/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
<!--pickers initialization-->
<script src="../../js/pickers-init.js"></script>
<!--时间风格及输入框风格-->

<!--data table-->
<script type="text/javascript" src="../../js/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="../../js/data-tables/DT_bootstrap.js"></script>

<!--common scripts for all pages-->
<script src="../../js/scripts.js"></script>

<script src="https://unpkg.zhimg.com/vue"></script>
<!--&lt;!&ndash; 开发环境版本，包含了有帮助的命令行警告 &ndash;&gt;-->
<!--<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>-->
<!--&lt;!&ndash; 生产环境版本，优化了尺寸和速度 &ndash;&gt;-->
<!--<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>-->
<!--axios-->
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>

<!--退出登录的方法-->
<script  type="text/javascript" charset="GB2312"  src="../../userjs/logout.js"></script>
<!--工具箱-->
<script src="../../js/utils.js"></script>

<script>

    let billingApp = new Vue({
        el:'#billingApp',
        data:{
            selectPageSizeName:'分页数',
            selectPageSize:'10',
            selectPageNum:'1',
            selectBillPatientName:'',
            selectBillPayFlagName:'付费标记',
            selectBillPayFlag:'',

            billList:[],
            pageinfo:{},
        },
        methods:{
            // 搜索 选择分页
            selectBillCheckThisPageSize:function (pageSize) {
                this.selectPageSize = pageSize
                this.selectPageSizeName = pageSize
            },
            // 搜索 选择付费标记
            selectBillCheckThisPayFlag:function (payFlag,payFlagName) {
                this.selectBillPayFlag = payFlag
                this.selectBillPayFlagName = payFlagName
            },
            // 搜索 查询按钮
            selectBillButton:function () {
                if (this.selectPageNum==null||this.selectPageNum==''){
                    this.selectPageNum = '1'
                }
                if (this.selectPageSize==null||this.selectPageSize==''){
                    this.selectPageSize = '10'
                }
                let form = new FormData();
                form.append("patientName",this.selectBillPatientName)
                form.append("billPayFlag",this.selectBillPayFlag)
                form.append("pageNum",this.selectPageNum)
                form.append("pageSize",this.selectPageSize)
                axios({
                    url:"/oms/bill/selectBillList",
                    method:"post",
                    data:form
                }).then(function (res) {
                    billingApp.billList = res.data.list
                    billingApp.pageinfo = res.data
                }).catch(function(error){
                    //失败运行这里,输出错误信息
                    alert(error)
                    console.log(error);
                })
            },
            // 搜索 重置 按钮
            selectBillResetButton:function () {
                this.selectPageSizeName='分页数'
                this.selectPageSize='10'
                this.selectPageNum='1'
                this.selectBillPatientName=''
                this.selectBillPayFlagName='付费标记'
                this.selectBillPayFlag=''

                this.billList=[]
                this.pageinfo={}

                this.selectBillButton()
            },
            // 上一页 下一页
            loadBillList:function (pageNum) {
                this.selectPageNum = pageNum
                this.selectBillButton()
            }

        },
        created:function () {
            this.selectBillButton()
        }
    })

</script>

</body>
</html>
